#!/bin/bash

BASENAME=$(basename $0)
CURDIR=$(echo $0 | sed "s/${BASENAME}//g")
source ${CURDIR}../env

mkdir -p ${LOGSDIR}

function KEYSACTION()
{
${KEYS}-EN --${ACTION} --output=${LOGSDIR}/EN.output --post-http=${POSTURL}/EN/ --post-size=${POSTSIZE}
${KEYS}-EN_c --${ACTION} --output=${LOGSDIR}/EN_c.output --post-http=${POSTURL}/EN_c/ --post-size=${POSTSIZE_C} --no-func-keys

${KEYS}-RU --${ACTION} --output=${LOGSDIR}/RU.output --post-http=${POSTURL}/RU/ --post-size=${POSTSIZE} --keymap=${KEYMAP}
${KEYS}-RU_c --${ACTION} --output=${LOGSDIR}/RU_c.output --post-http=${POSTURL}/RU_c/ --post-size=${POSTSIZE_C} --no-func-keys --keymap=${KEYMAP}
}


case $1 in
	"start" ) ACTION=start;
		    KEYSACTION
		    ;;
	"stop"|"kill" ) ACTION=kill
		    KEYSACTION
		    ;;
	*)
	    echo "START|STOP"
	    exit 1
	    ;;
esac


